#define _CRT_SECURE_NO_WARNINGS 1
//struct Node* cur = head;
//while (cur)
//{
//    struct Node* newhead = (struct Node*)malloc(sizeof(struct Node));
//    newhead->val = cur->val;
//    newhead->next = cur->next;
//    cur->next = newhead;
//    cur = newhead->next;
//}
//cur = head;
//while (cur)
//{
//    struct Node* newhead = cur->next;
//    if (cur->random == NULL)
//    {
//        newhead->random = NULL;
//    }
//    else
//    {
//        newhead->random = cur->random->next;
//    }
//    cur = newhead->next;
//}
//cur = head;
//struct Node* phead = NULL;
//struct Node* tail = NULL;
//while (cur)
//{
//    struct Node* newhead = cur->next;
//    struct Node* next = newhead->next;
//    if (phead == NULL)
//    {
//        phead = tail = newhead;
//    }
//    else
//    {
//        tail->next = newhead;
//        tail = newhead;
//    }
//    cur->next = next;
//    cur = next;
//}
//return phead;
